package com.xdf.docmanagementsystem.config;

import org.apache.shiro.subject.Subject;
import org.apache.shiro.subject.SubjectContext;
import org.apache.shiro.web.mgt.DefaultWebSubjectFactory;
import org.springframework.context.annotation.Configuration;

/**
 * @program: doc-management-system
 * @description:
 * @author: Zhang
 * @create: 2020-06-24 23:13
 **/
@Configuration
public class JWTDefaultSubjectFactory extends DefaultWebSubjectFactory {
    /**
     * 取消session
     *
     * @param context
     * @return
     */
    @Override
    public Subject createSubject(SubjectContext context) {
        context.setSessionCreationEnabled(false);
        return super.createSubject(context);
    }
}
